package com.flycms.module.offline.model;

import java.io.Serializable;
import java.util.Date;

import javax.validation.constraints.Future;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

import com.fasterxml.jackson.annotation.JsonFormat;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 *
 * <br/>Copyright 2020
 * <br/>All rights reserved
 * @author 沁言訫語
 * @version 2020年3月2日
 * @Date 2020年3月2日
 */

@Data
@AllArgsConstructor
@NoArgsConstructor
public class OfflineActivity implements Serializable {
    
    private static final long serialVersionUID = 1L;
    
    private Long id;
    
    @NotBlank(message = "线下活动名不能为空")
    @Size(max = 200, message = "线下活动名不能不能超过200字符")
    private String name;
    
    @NotBlank(message = "线下活动图片不能为空")
    private String imgPath;
    
    @NotBlank(message = "线下活动内容不能为空")
    private String content;
    
    @NotNull(message = "线下活动开始时间不能为空")
    @Future(message = "线下活动开始时间必须在当前时间之后")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date startTime;
    
    @NotNull(message = "线下活动结束时间不能为空")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date endTime;
    
    @NotBlank(message = "线下活动地点不能为空")
    private String position;
    
    //线下活动状态 0：已结束 1：报名中 2：活动中
    private Integer status;
    
    private Date createTime;
    
    private Date updateTime;

}
